package com.baidu.xiaosu.controller;

import com.baidu.xiaosu.bean.User;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/user")
public class DemoController {

    @RequestMapping("/getById/{id}")
    public User getById(@PathVariable("id") String id){
        System.out.println("8082获取用户："+id);
        User user = new User();
        user.setName(id);
        user.setPassword(id);
        return user;
    }

}
